home *** CD-ROM | disk | FTP | other *** search
/ il gioco del Kamasutra / Milo Manara Kamasutra.iso / mac / DATA / ParteIII / GameI / Spada.dir / 00034_Script_34 < prev    next >
Text File  |  1997-11-24  |  3KB  |  82 lines

  1. on mouseEnter
  2.   set the cursor of sprite 37 to [the number of cast "MouseOpen", the number of cast "MouseOpenMask"]
  3. end mouseEnte
  4.  
  5. on mouseleave
  6.   
  7.   set the visible of sprite 37 to 0
  8.   
  9. end mouseleave
  10.  
  11.  
  12. on mousedown
  13.   global oldloc, x0, y0, x1, y1
  14.   puppetsprite 37, true
  15.   set the cursor of sprite 37 to [the number of cast "MouseClose", the number of cast "MouseCloseMask"]
  16.   set x0 = the loch of sprite 37
  17.   set y0 = the locv of sprite 37
  18.   repeat while the stilldown
  19.     set the loc of sprite 37 to point(the mouseH,the mouseV)
  20.     updatestage
  21.   end repeat
  22.   Puppetsound 3,"Click2"
  23. end mousedown
  24.  
  25. on mouseUp
  26.   global oldloc, x0, y0, x1, y1
  27.   global oldloc, UomoTesto1, UomoTesto2, UomoTesto3, UomoCard1, UomoCard2, UomoCard3
  28.   global Coppia1, Coppia2, Coppia3, Test1, Test2, Test3
  29.   set the cursor of sprite 37 to [the number of cast "MouseOpen", the number of cast "MouseOpenMask"]
  30.   if (Test1 = 0) and (inside(the loc of sprite 37, the rect of sprite 14 ) = 1) then
  31.     set the loc of sprite 37 to oldloc
  32.     puppetsprite 37, 0
  33.     set the membernum of sprite 21 to (the membernum of sprite 37)
  34.     set the loc of sprite 21 to point(85, 361)
  35.     set UomoCard1 = the name of member (the membernum of sprite 37)  
  36.     set the text of member 17 to "Uomo " & (the name of member (the membernum of sprite 37))
  37.     put the text of member 17 into UomoTesto1
  38.     updatestage
  39.   else if (Test2 = 0) and (inside(the loc of sprite 37, the rect of sprite 15 ) = 1) then
  40.     set the loc of sprite 37 to oldloc
  41.     puppetsprite 37, 0
  42.     set the membernum of sprite 22 to (the membernum of sprite 37)
  43.     set the loc of sprite 22 to point(275, 361)
  44.     set UomoCard2 = the name of member (the membernum of sprite 37)
  45.     set the text of member 18 to "Uomo " & (the name of member (the membernum of sprite 37))
  46.     put the text of member 18 into UomoTesto2
  47.     updatestage
  48.   else if (Test3 = 0) and (inside(the loc of sprite 37, the rect of sprite 16 ) = 1) then
  49.     set the loc of sprite 37 to oldloc
  50.     puppetsprite 37, 0
  51.     set the membernum of sprite 23 to (the membernum of sprite 37)
  52.     set the loc of sprite 23 to point(465, 361)
  53.     set UomoCard3 = the name of member (the membernum of sprite 37)
  54.     set the text of member 19 to "Uomo " & (the name of member (the membernum of sprite 37))
  55.     put the text of member 19 into UomoTesto3
  56.     updatestage
  57.   else
  58.     put the loch of sprite 37 into x1
  59.     put the locv of sprite 37 into y1
  60.     set passo = integer(abs(x1-x0))
  61.     if x1 <> x0 then
  62.       if x1 > x0 then
  63.         repeat with n = 20 down to 1
  64.           set the loch of sprite 37 = (x1 - passo/n)
  65.           set the locv of sprite 37 = ((y1-y0)*(x1 - passo/n) + (x1*y0 -x0*y1))/(x1-x0)
  66.           updatestage
  67.         end repeat
  68.       else
  69.         repeat with n = 20 down to 1
  70.           set the loch of sprite 37 = (x1 + passo/n)
  71.           set the locv of sprite 37 = ((y1-y0)*(x1 + passo/n) + (x1*y0 -x0*y1))/(x1-x0)
  72.           updatestage
  73.         end repeat
  74.       end if
  75.     end if
  76.     set the loch of sprite 37 = x0
  77.     set the locv of sprite 37 = y0
  78.     updatestage
  79.   end if
  80.   
  81. end mouseUp
  82.